// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 添加新闻 */
export async function createFeedback(options) {
  return request<{
    data;
  }>('/api/mjOpinion/add', {
    method: 'POST',
    data:(options || {}),
  });
}

/** 删除新闻 */
export async function deleteFeedback(options) {
    return request<{
      data;
    }>('/api/mjOpinion/delete', {
      method: 'GET',
       params: options,
    });
  }
  
  /** 新闻列表 */
export async function fetchFeedbackList(options) {
   const result = await request('/api/mjOpinion/queryByPage', {
      method: 'POST',
      data: options,
    });
    return { data: result.data.records, success: true,total:result.data.total }
  }
  
  
export async function updateFeedback(options) {
    console.log(options)
    return request<{
      data;
    }>('/api/mjNews/edit', {
      method: 'POST',
      data:(options || {}),
    });
  }
